#!/bin/sh

. $(dirname $0)/system.conf


software_dir=$topdir/software

mkdir -p $software_dir
mkdir -p $software_dir/tarballs


if [ ! -d "$software_dir/$sshpass_release" ]; then
    echo "start compile sshpass..."
    if [ ! -f $software_dir/tarballs/$sshpass_release/"$sshpass_release".tar.gz ]; then
        cd $software_dir/tarballs &&                                              \
        wget https://sourceforge.net/projects/sshpass/files/sshpass/1.06/"$sshpass_release".tar.gz
    fi
    tar xvf $software_dir/tarballs/$sshpass_release/"$sshpass_release".tar.gz -C $software_dir &&  \
    cd $sshpass_dir &&                                                            \
    ./configure &&                                                                \
    make
else
    echo "sshpass dir: $sshpass_release has existed"
fi
